<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <title>${config.siteName!} - 忘记密码</title>
    <meta name="keywords" content="${config.keywords!}">
    <meta name="description" content="${config.decText!}">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/static/css/register.css" rel="stylesheet" type="text/css">
    <script src="/static/js/jquery-1.11.3.min.js"></script>
    <link href="/static/layer/mobile/need/layer.css" rel="stylesheet">
    <script type="text/javascript" src="/static/layer/layer.js"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .login-bg {
            background: url(/static/images/bg.png) no-repeat center;
            background-size: cover;
            overflow: hidden;
        }
    </style>
</head>
<body class="login-bg">
<div class="main">
    <div class="appRegister">
        <aside class="Register">
            <section class="main">
                <form class="registerform" id="registerform" onsubmit="return false;" method="post">
                    <div class="mip-reset-heading"><a class="cancel" href="javascript:"></a>${config.siteName!} - 找回账号密码
                    </div>
                    <div class="mip-step-body">
                        <div class="el-form-item">
                            <div class="el-form-item__content">
                                <div class="el-input">
                                    <span style="color: green;text-align: center;">通过注册时的邮箱找回账号密码</span>
                                    <input class="el-input__inner" type="text"
                                           autocomplete="off" value="" datatype="m" id="email" name="email"
                                           placeholder="请输入注册时的邮箱">
                                </div>
                            </div>
                        </div>
                        <div class="el-form-item">
                            <div class="el-form-item__content">
                                <button type="button" class="el-button w-100 el-button--primary " id="post_reg"
                                        onclick="re_email(this)"><span>找回账号信息</span></button>
                            </div>
                        </div>
                        <p class="login-link"><a href="/admin/login">商户登录</a>&nbsp;&nbsp;<a href="/register">注册商户</a>&nbsp;&nbsp;<a
                                href="/index.do">首页</a><span></span>
                        </p>
                    </div>
                </form>
            </section>
        </aside>
    </div>
    <div class="copyright"
         style="text-align: center; position: absolute;bottom:0;width: 100%; color: #6d6d6d;line-height: 26px; font-size: 14px; margin-bottom: 15px;">
        Copyright ${config.copyright!} Tech Inc. All Rights Reserved. ${config.icpInfo!}
        <div style="display:none"></div>
    </div>
</div>
</body>
<script>

    function re_email(obj) {
        var code = $(obj);
        var to_user = $("#email").val();
        code.html("<span>请稍等</span>");
        $.post("/re_email/send",
            {"email": to_user},
            function (data) {
                code.html("<span>找回账号信息</span>");
                layer.alert(data.msg, {icon: 6}, function () {
                    if (data.code == 0) {
                        window.location = "/admin/login?spm=" + new Date().getTime();
                    }else{
                        layer.closeAll();
                    }
                });
            }, "json");
    }

</script>
</html>

